package com.责任链模式;

/**
 * 部门领导
 * @author Fang Ruichuan
 * @date 2022-09-03 13:16
 */
public class DepartmentLeader implements Ratify {

    @Override
    public Result deal(Chain chain) {
        Request request = chain.request();
        System.out.println("DepartmentLeader=====>request: " + request.toString());
        if (request.getDays() > 7) {
            return new Result(false, "你这个完全没必要");
        }
        return new Result(true, "DepartmentLeader: 不要着急，把事情处理完再回来！");
    }

}
